<div>
  <span class="brand" style="font-weight:bold;">{{systemRuleDialog.title}}</span>
  <div class="card" style="margin-top: 20px;margin-bottom: 10px;">
    <div class="panel-body">
      <div class="row">
        <form class="form-horizontal" role="form">

          <div class="form-group">
            <label class="col-sm-2 control-label">阈值类型</label>
            <div class="col-sm-9">
              <div align="center" class="form-control" ng-if="systemRuleDialog.type == 'edit'">
                <!--highestSystemLoad -->
                <input checked name="grade" ng-disabled="systemRuleDialog.type == 'edit'" ng-model='currentRule.grade' type="radio"
                       value="0"/>&nbsp;LOAD&nbsp;&nbsp;
                <!--avgRt -->
                <input name="grade" ng-disabled="systemRuleDialog.type == 'edit'" ng-model='currentRule.grade' type="radio"
                       value="1"/>&nbsp;RT&nbsp;&nbsp;
                <!--maxThread -->
                <input name="grade" ng-disabled="systemRuleDialog.type == 'edit'" ng-model='currentRule.grade' type="radio"
                       value="2"/>&nbsp;线程数&nbsp;&nbsp;
                <!--qps -->
                <input name="grade" ng-disabled="systemRuleDialog.type == 'edit'" ng-model='currentRule.grade' type="radio"
                       value="3"/>&nbsp;入口 QPS&nbsp;&nbsp;
                <!--highestCpuUsage -->
                <input name="grade" ng-disabled="systemRuleDialog.type == 'edit'" ng-model='currentRule.grade' type="radio"
                       value="4"/>&nbsp;CPU 使用率&nbsp;&nbsp;

              </div>
              <div align="center" class="form-control highlight-border" ng-if="systemRuleDialog.type == 'add'">
                <!--highestSystemLoad -->
                <input name="grade" ng-disabled="systemRuleDialog.type == 'edit'" ng-model='currentRule.grade' type="radio"
                       value="0"/>&nbsp;LOAD&nbsp;&nbsp;
                <!--avgRt -->
                <input name="grade" ng-disabled="systemRuleDialog.type == 'edit'" ng-model='currentRule.grade' type="radio"
                       value="1"/>&nbsp;RT&nbsp;&nbsp;
                <!--maxThread -->
                <input name="grade" ng-disabled="systemRuleDialog.type == 'edit'" ng-model='currentRule.grade' type="radio"
                       value="2"/>&nbsp;线程数&nbsp;&nbsp;
                <!--qps -->
                <input name="grade" ng-disabled="systemRuleDialog.type == 'edit'" ng-model='currentRule.grade' type="radio"
                       value="3"/>&nbsp;入口 QPS&nbsp;&nbsp;
                <!--highestCpuUsage -->
                <input checked name="grade" ng-disabled="systemRuleDialog.type == 'edit'" ng-model='currentRule.grade' type="radio"
                       value="4"/>&nbsp;CPU 使用率&nbsp;&nbsp;

              </div>
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-2 control-label">阈值</label>
            <div class="col-sm-9">
              <input class="form-control highlight-border" min="0" ng-if="currentRule.grade == 0"
                     ng-model='currentRule.highestSystemLoad' placeholder="[0, ~)的正整数" type='number'/>
              <input class="form-control highlight-border" min="0" ng-if="currentRule.grade == 1" ng-model='currentRule.avgRt'
                     placeholder="[0, ~)的正整数" type='number'/>
              <input class="form-control highlight-border" min="0" ng-if="currentRule.grade == 2" ng-model='currentRule.maxThread'
                     placeholder="[0, ~)的正整数" type='number'/>
              <input class="form-control highlight-border" min="0" ng-if="currentRule.grade == 3" ng-model='currentRule.qps'
                     placeholder="[0, ~)的正整数" type='number'/>
              <input class="form-control highlight-border" min="0" ng-if="currentRule.grade == 4" ng-model='currentRule.highestCpuUsage'
                     placeholder="[0, 1]的小数，代表百分比" type='number'/>
            </div>
          </div>
        </form>
      </div>
      <div class="separator"></div>
      <div clss="row" style="margin-top: 20px;">
        <button class="btn btn-outline-danger" ng-click="closeThisDialog()"
                style="float:right; height: 30px;font-size: 12px;margin-left: 10px;">取消
        </button>
        <button class="btn btn-outline-success" ng-click="saveRule()"
                style="float:right; height: 30px;font-size: 12px;">{{systemRuleDialog.confirmBtnText}}
        </button>
      </div>
    </div>
  </div>
</div>
